run-with-locales: Normalize utf8 to UTF-8 without using SUPPORTED file
authorSimon McVittie <smcv@debian.org>
Mon, 2 Nov 2020 13:53:17 +0000 (13:53 +0000)
committerSimon McVittie <smcv@debian.org>
Mon, 2 Nov 2020 13:53:17 +0000 (13:53 +0000)
debian/run-with-locales

index 5adb42d15c061e038edfee6606ef99b9a7f55d3e..a63d22bdeb2ae7337d746302bc3687adb86430f6 100755 (executable)
@@ -84,7 +84,15 @@ generate () {
         return
     fi
 
-    charset=$(sed -ne "s/^$locale //p" /usr/share/i18n/SUPPORTED)
+    case "$locale" in
+        (*.utf8)
+            charset="UTF-8"
+            ;;
+
+        (*)
+            charset=$(sed -ne "s/^$locale //p" /usr/share/i18n/SUPPORTED)
+            ;;
+    esac
 
     if [ -z "$charset" ]; then
         echo "$me: $locale not found in /usr/share/i18n/SUPPORTED" >&2